﻿#define  _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

/*---------------------------------------------------------------------
* 题目：将13⼆进制序列的第5位修改为1，然后再改回0
* ---------------------------------------------------------------------*/

int main()
{
	int a = 13;
	//13的2进制序列： 00000000000000000000000000001101
	a = a | (1 << 4);
	//将第5位置为1后：00000000000000000000000000011101 （29）
	printf("a = %d\n", a);
	a = a & ~(1 << 4);
	//将第5位再置为0：00000000000000000000000000001101
	printf("a = %d\n", a);
	return 0;
}